<%@page language="java" pageEncoding="UTF-8" %>
<%@page contentType="text/html;charset=UTF-8" %>
<!DOCTYPE html>
<html>
    <head>
        <title>声明类</title>
        <% sayHello a=new sayHello(false); %>
        <%! public class sayHello
            {  boolean country;
               sayHello(boolean country){this.country=country;}
               String Hello()
               {
                   if(country)
                        {return "hello";}
                     else 
                        return("你好");
               }
            }
        %>
       
    </head>
    <body bgcolor="FFFFEE">
        
        <h1><%=a.Hello()%> ,World!</h1>
    </body>
</html>
